﻿using System.Collections.ObjectModel;
using System.Windows;
using System.Windows.Controls;
using SnakeGame.Models;

namespace SnakeGame.Views
{
    /// <summary>
    /// Interaction logic for MainFrame.xaml
    /// </summary>
    public partial class MainFrame : Frame
    {
        public int NumberOfPlayer { get; set; }
        public Window Window { get; set; }

        public ObservableCollection<Player> Players;

        public MainFrame()
        {
            InitializeComponent();
        }

        private void MainFrame_OnLoaded(object sender, RoutedEventArgs e)
        {
            SelectPlayer scPage = new SelectPlayer();
            Navigate(scPage);
            scPage.Initialize(this);
        }

        public void NewGame()
        {
            NumberOfPlayer = 0;
            Players.Clear();

            SelectPlayer scPage = new SelectPlayer();
            Navigate(scPage);
            scPage.Initialize(this);
        }
    }
}
